package com.cqfan.cloud.flow.core;


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import com.yomahub.liteflow.slot.DefaultContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class ExecComp {

    @Resource
    private FlowExecutor flowExecutor;

    public void testConfig() throws JsonProcessingException {


        LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg", DefaultContext.class);
        System.out.println(response);
    }
}
